<!DOCTYPE html>
<html lang="en" class="is-centered is-bold">

<head>
    <meta charset="utf-8">
    <title>零基础</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="__CSS__/bootstrap.css">
    <link rel="stylesheet" href="__CSS__/bootstrap-datetimepicker.css">
    <!-- 引入时间插件 -->
    <script src="__JS__/jquery.min.js"></script>
    <script src="__JS__/moment.min.js"></script>
    <script src="__JS__/bootstrap.min.js"></script>
    <script src="__JS__/moment-with-locales.js"></script>
    <script src="__JS__/bootstrap-datetimepicker.js"></script>

</head>

<body>
    <div class="container" style="padding-top: 20px">
        <div class="col-sm-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">添加图书</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" role="form" method="POST" action="{:url('Index/addBook')}">
                        <div class="row">

                            <div class="col-md-8">
                                <div class="form-group">
                                    <label for="name" class="col-md-2 control-label">
                                        名称
                                    </label>
                                    <div class="col-md-10">
                                        <input type="text" class="form-control" name="name" id="name" value="">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="name" class="col-md-2 control-label">
                                        分类
                                    </label>
                                    <div class="col-md-10">
                                        <select class="form-control" name="category">
                                            <option value="PHP">PHP</option>
                                            <option value="Java">Java</option>
                                            <option value="C++">C++</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="price" class="col-sm-2 control-label">
                                        价格
                                    </label>
                                    <div class="col-md-10">
                                        <input type="text" class="form-control" name="price" id="price" value="">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">出版时间</label>
                                    <div class='col-md-10'>
                                        <div class='input-group date' id='publish_time'>
                                            <input type='text' class="form-control" name="publish_time" />
                                            <span class="input-group-addon">
                                                <span class="glyphicon glyphicon-calendar"></span>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="form-group">
                                <div class="col-md-10 col-md-offset-2">
                                    <button type="submit" class="btn btn-primary btn-lg">
                                        <i class="fa fa-disk-o"></i>
                                        提交
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script>
        //datetimepicker日期插件，获取日期
        $('#publish_time').datetimepicker({
            format: "Y-MM-DD",
            locale: moment.locale('zh-cn')
        });
    </script>
</body>

</html>